<script setup lang="ts">
const { VITE_CASINO_GAME_PAGE_SIZE } = getEnv()

const sortType = ref(EnumCasinoSortType.hot)
const pids = ref('') //供应商

// 推荐游戏
const paramsRec = computed(() => ({ sort: sortType.value, platform_id: pids.value }))
const {
    page,
    list: recList,
    total: recTotal,
    runAsync: runRecList,
    loading: loadingRec,
    loadMore: loadMoreRec,
} = useList(ApiMemberGameRecList, {}, { page_size: VITE_CASINO_GAME_PAGE_SIZE })

function onPage(p: number) {
    page.value = p
}

function init() {
    // 初始化
    runRecList(paramsRec.value)
}
init()
</script>
<template>
    <BaseGameList @page="onPage" :loading="loadingRec" :data="recList" :total="recTotal" :page="page"
        :page-size="VITE_CASINO_GAME_PAGE_SIZE" />
</template>
<style scoped lang="scss"></style>